Part of bgo#613728 - [GtkTreeView] Focus the list, not the headers, when Tab-focusing
authorFederico Mena Quintero <federico@novell.com>
Thu, 14 Oct 2010 18:17:46 +0000 (13:17 -0500)
committerFederico Mena Quintero <federico@novell.com>
Thu, 14 Oct 2010 18:17:46 +0000 (13:17 -0500)
The idea is that it is way more common to want to manipulate the
actual list, rather than the headers.  Once you Tab into the treeview
(and the list part gets the focus), you can use Shift-Tab to focus
the headers.

This means that some hysteresis is added to the focus chain, but
it makes the treeview a lot more convenient to focus with the keyboard.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
gtk/gtktreeview.c

index ff78b3324cd804433b2528f3dcd5c0b76f19cfdb..662b7e0940b96c912dd58a89f2746f4b6da516b8 100644 (file)
@@ -8031,8 +8031,7 @@ gtk_tree_view_focus (GtkWidget        *widget,
   /* Case 2. We don't have focus at all. */
   if (!gtk_widget_has_focus (widget))
     {
-      if (!gtk_tree_view_header_focus (tree_view, direction, FALSE))
-       gtk_widget_grab_focus (widget);
+      gtk_widget_grab_focus (widget);
       return TRUE;
     }